#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :save_movie_annual2022.py
# @Time      :2023/10/12 
# @Author    :CL
# @email     :1037654919@qq.com
from bs4 import BeautifulSoup

from douban import Douban
douban = Douban()
from utils import mongo_manager
douban_movie_annual2022 = mongo_manager('douban_movie_annual2022')
def save_movie_annual2022():
    jsondata =  douban.get_movie_annual2022()
    jsondata["_id"] = 'douban_movie_annual2022'
    try:
        # print(data)
        douban_movie_annual2022.insertOne(jsondata)
    except Exception as e:
        print(e)

if  __name__ == "__main__":
    save_movie_annual2022()